home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / Notification.a < prev    next >
Encoding:
Text File  |  1996-05-01  |  5.4 KB  |  188 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Notification.a
  3. ;
  4. ;    Contains:    Notification Manager interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__NOTIFICATION__') = 'UNDEFINED' THEN
  19. __NOTIFICATION__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  25.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  26.     include 'OSUtils.a'
  27.     ENDIF
  28.     ENDIF
  29.     IF &TYPE('__COLLECTIONS__') = 'UNDEFINED' THEN
  30.     include 'Collections.a'
  31.     ENDIF
  32.     IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
  33.     include 'Kernel.a'
  34.     ENDIF
  35. ;  ------------------ 
  36.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  37.  
  38.  
  39. ;  notification status flags 
  40.  
  41. kInvalidNotification            EQU        1                    ; notification ref invalid        
  42. kUnSentNotification                EQU        2                    ; notification not yet sent    
  43. kPostedNotification                EQU        3                    ; notification has been posted    
  44. ; typedef UInt32                         NotificationStatus
  45.  
  46. ;  notification tags 
  47.  
  48. kNotificationTypeTag            EQU        'type'                ; type of notification (multiple types allowed) 
  49. kNotificationRefTag                EQU        'nref'                ; notification ref (usually retrieved at completion) 
  50. kTextNotificationTag            EQU        'text'                ; ASCII text 
  51. kTextObjectNotificationTag        EQU        'tobj'                ; text object model format text 
  52. kSoundNotificationTag            EQU        'snd '                ; sound data in format of 'snd ' resource 
  53. kSmall8BitIconTag                EQU        'ics8'                ; 8-bit icon 
  54. kSmall4BitIconTag                EQU        'ics4'                ; 4-bit icon 
  55. kSmall1BitMaskIconTag            EQU        'ics#'                ; 1-bit icon w/mask 
  56. kProcessSerialNumberTag            EQU        'psn '                ; psn we wish to mark 
  57. ;  notification module identifiers 
  58.  
  59. kAlertNotifier                    EQU        'alrt'                ; display a modal alert with OK button 
  60. kSoundNotifier                    EQU        'snd '                ; play a sound 
  61. kProcessMenuNotifier            EQU        'pmnu'                ; flash icon in title of process menu 
  62. kAppleMenuNotifier                EQU        'amnu'                ; flash icon in title of apple menu 
  63. kMenuMarkNotifier                EQU        'mmrk'                ; put a mark in the process menu 
  64. ; typedef OSType                         NotifierType
  65.  
  66. ;  notification posting options 
  67.  
  68. kAutoDisposeOnCompletionMask    EQU        $00000001            ; dispose the notification request on completion 
  69. ; typedef OptionBits                     NotificationOptions
  70.  
  71. ;  ------------------ 
  72. ;
  73. ; pascal OSStatus NewNotificationRef(NotificationRef *notification)
  74. ;
  75.     IF GENERATINGCFM THEN
  76.         IMPORT_CFM_FUNCTION NewNotificationRef
  77.     ENDIF
  78.  
  79. ;
  80. ; pascal OSStatus AddNotificationCollectionItem(NotificationRef notification, CollectionTag tag, UInt32 id, void *itemData, ByteCount itemSize)
  81. ;
  82.     IF GENERATINGCFM THEN
  83.         IMPORT_CFM_FUNCTION AddNotificationCollectionItem
  84.     ENDIF
  85.  
  86. ;
  87. ; pascal OSStatus GetNotificationCollectionItem(NotificationRef notification, CollectionTag tag, UInt32 id, void **dataPtr, ByteCount *itemSize)
  88. ;
  89.     IF GENERATINGCFM THEN
  90.         IMPORT_CFM_FUNCTION GetNotificationCollectionItem
  91.     ENDIF
  92.  
  93. ;
  94. ; pascal OSStatus PostNotification(NotificationRef notification, const KernelNotification *completion, Duration timeOut, NotificationOptions postingOptions)
  95. ;
  96.     IF GENERATINGCFM THEN
  97.         IMPORT_CFM_FUNCTION PostNotification
  98.     ENDIF
  99.  
  100. ;
  101. ; pascal NotificationStatus GetNotificationStatus(NotificationRef notification)
  102. ;
  103.     IF GENERATINGCFM THEN
  104.         IMPORT_CFM_FUNCTION GetNotificationStatus
  105.     ENDIF
  106.  
  107. ;
  108. ; pascal OSStatus DisposeNotificationRef(NotificationRef notification)
  109. ;
  110.     IF GENERATINGCFM THEN
  111.         IMPORT_CFM_FUNCTION DisposeNotificationRef
  112.     ENDIF
  113.  
  114. ;
  115. ; pascal OSStatus NewNotificationRefFromMemory(void *messageBuffer, ByteCount size, NotificationRef *notification)
  116. ;
  117.     IF GENERATINGCFM THEN
  118.         IMPORT_CFM_FUNCTION NewNotificationRefFromMemory
  119.     ENDIF
  120.  
  121. ;
  122. ; pascal ByteCount GetFlattenedNotificationSize(NotificationRef notification)
  123. ;
  124.     IF GENERATINGCFM THEN
  125.         IMPORT_CFM_FUNCTION GetFlattenedNotificationSize
  126.     ENDIF
  127.  
  128. ;
  129. ; pascal OSStatus FlattenNotification(NotificationRef notification, void *buffer)
  130. ;
  131.     IF GENERATINGCFM THEN
  132.         IMPORT_CFM_FUNCTION FlattenNotification
  133.     ENDIF
  134.  
  135.     ENDIF
  136. ;  ------------------ 
  137. ;  ------------------ 
  138.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  139.  
  140.  
  141. ; typedef NMRec *                        NMRecPtr
  142.  
  143. NMRec                    RECORD 0
  144. qLink                     ds.l    1                ; offset: $0 (0)        ;  next queue entry
  145. qType                     ds.w    1                ; offset: $4 (4)        ;  queue type -- ORD(nmType) = 8
  146. nmFlags                     ds.w    1                ; offset: $6 (6)        ;  reserved
  147. nmPrivate                 ds.l    1                ; offset: $8 (8)        ;  reserved
  148. nmReserved                 ds.w    1                ; offset: $C (12)        ;  reserved
  149. nmMark                     ds.w    1                ; offset: $E (14)        ;  item to mark in Apple menu
  150. nmIcon                     ds.l    1                ; offset: $10 (16)        ;  handle to small icon
  151. nmSound                     ds.l    1                ; offset: $14 (20)        ;  handle to sound record
  152. nmStr                     ds.l    1                ; offset: $18 (24)        ;  string to appear in alert
  153. nmResp                     ds.l    1                ; offset: $1C (28)        ;  pointer to response routine
  154. nmRefCon                 ds.l    1                ; offset: $20 (32)        ;  for application use
  155. sizeof                     EQU *                    ; size:   $24 (36)
  156.                         ENDR
  157. ;  ------------------ 
  158. ;
  159. ; pascal OSErr NMInstall(NMRecPtr nmReqPtr)
  160. ;
  161.     IF ¬ GENERATINGCFM THEN
  162.         ; parameters:
  163.         ;    nmReqPtr        => A0
  164.         ; returns:
  165.         ;    OSErr           <= D0
  166.         _NMInstall:    OPWORD    $A05E
  167.     ELSE
  168.         IMPORT_CFM_FUNCTION NMInstall
  169.     ENDIF
  170.  
  171. ;
  172. ; pascal OSErr NMRemove(NMRecPtr nmReqPtr)
  173. ;
  174.     IF ¬ GENERATINGCFM THEN
  175.         ; parameters:
  176.         ;    nmReqPtr        => A0
  177.         ; returns:
  178.         ;    OSErr           <= D0
  179.         _NMRemove:    OPWORD    $A05F
  180.     ELSE
  181.         IMPORT_CFM_FUNCTION NMRemove
  182.     ENDIF
  183.  
  184.     ENDIF
  185. ;  ------------------ 
  186.     ENDIF ; __NOTIFICATION__ 
  187.  
  188.